import React from 'react';
class VoteFooter extends React.Component {
	render() {
		return <footer>
			<button onClick={this.handle.bind(this, 0)}>支持</button>
			<button onClick={this.handle.bind(this, 1)}>反对</button>
		</footer>;
	}
	handle = lx => {
		const { store } = this.props;
		if (lx === 0) {
			//=>给REDUCER派发不同的行为对象
			store.dispatch({
				type: 'SUPPORT',
				payload: 20
			});
			return;
		}
		store.dispatch({
			type: 'OPPOSE',
			num: 10
		});
	};
}
export default VoteFooter;